package com.t.bricks.bussiness.controller.ocr;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.t.bricks.bussiness.model.ocr.ConditionOcr;
import com.t.bricks.bussiness.service.ocr.OcrService;
import com.t.bricks.model.MsgEmity;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@Api(value="OCR图片文字提取", tags={"OCR文字提取操作接口"})
@RequestMapping("/ocr/")
public class OcrServiceController {
	
	@Autowired
	private OcrService ocrService;

	@ApiOperation(value="OCR图片提取文字",notes="提取文字，图片中文字越多提取所用时间越长")
	@RequestMapping(method={RequestMethod.POST}, value="/translate")
	public MsgEmity translate(@RequestBody ConditionOcr conditionOcr) {
		return ocrService.translate(conditionOcr);
	}
	
}
